﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GONES.IBLL;

public partial class Console_System_Navs_NavEdit : CPage
{
    public string NavId { get; set; }
    public string Title { get; set; }
    public string Ptge { get; set; }
    public string Url { get; set; }
    public string ParentId { get; set; }
    public string ParentTitle { get; set; }
    public string Iconcls { get; set; }
    public string SortNum { get; set; }
    public string Visible { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
         NavId = Request.QueryString["ID"].ToString();
        var navManager = AppContext.GetObject("S_NavManager") as IS_NavManager;
        GONES.Model.S_Nav nav = new GONES.Model.S_Nav();
        nav = navManager.Get(NavId);
        if (nav != null)
        {
            Title = nav.Title.Trim();
            Ptge = nav.Ptag.Trim();
            ParentId = nav.Parentid.Trim();
            Url =nav.Url.Trim(); 
            SortNum = nav.SortNum.ToString();
            ParentTitle =navManager.Get(ParentId).Title;
            Iconcls = nav.Iconcls;
            Visible = nav.Visible == 0 ? "checked" : "";
        }
    }
}